-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [set]DailyOffpeakTimeUTC option to Java API #13148
Add [set]DailyOffpeakTimeUTC option to Java API #13148
Conversation
@@ -759,6 +759,19 @@ public long compactionReadaheadSize() { | |||
return compactionReadaheadSize(nativeHandle_); | |||
} | |||
|
|||
@Override | |||
public DBOptions setDailyOffpeakTimeUTC(String offpeakTimeUTC) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good design. Somebody can say that java date/time data structures can be better, but conversion will probably make more problems. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought hard about that. If I would use the the java date/time, I need to parse the HH:mm-HH:mm format. Better to just present the same string as RockSDB does.
LGTM |
2bb94d2
to
a5cc7ab
Compare
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@alanpaxton Would you be able to rebase this PR? I will then re-import and merge the change. |
Reflect RocksDB DailyOffpeakTimeUTC option in Java API. As is standard for options, there are a number of different places where this option needs to be added. The new option is a string value. This requires an extension to the internal MutableDBOptions parse code, which received the entire options string from C++ and parses it on the Java side.
a5cc7ab
to
1c742cb
Compare
@alanpaxton has updated the pull request. You must reimport the pull request before landing. |
@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@jaykorean merged this pull request in 9b1d0c0. |
Reflect RocksDB DailyOffpeakTimeUTC option in Java API. As is standard for options, there are a number of different places where this option needs to be added: it is an option, a DB option, and it is mutable (can be changed while running).
The new option is a string value. This requires an extension to the internal MutableDBOptions parse code, which received the entire options string from C++ and parses it on the Java side.